<?php

/**
 * Блок меню навигации по секциям админки.
 *
 */
class Backend_Block_Sections extends Kernel_Block {

    /**
     * Возвращает данные шаблона для формирования блока.
     *
     * @return  array
     */
    public function getData() {
        $sections = array();
        foreach (Backend_Filter_Structure::$sections as $id => $section) {
            $sections[] = array(
                  'name' => $section,
                'active' => $id == Backend_Filter_Structure::get('section'),
                  'url' => array('section' => $id, 'module' => null, 'manager' => null),
            );
        }
        return array('sections' => $sections);
    }
}
